﻿namespace OverStore.Runtime.OverStoreContext
{
    using OverStore.Runtime.Logger;
    using OverStore.Runtime.PersistenceServiceProvider;
    using OverStore.Runtime.Storage;
using OverStore.Scoping.Manager;

    /// <summary>
    /// Provide access to set of services which are available for all other components.
    /// </summary>
    public interface IOverStoreContext
    {
        /// <summary>
        /// Get current persistence session;
        /// </summary>
        IPersistenceSession CurrentSession { get; }

        /// <summary>
        /// Gets service provider allows to obtain services performs different persistence operations on instances of specified type.
        /// </summary>
        IPersistenceServiceProvider PersistenceServiceProvider { get; }

        /// <summary>
        /// Get current data storage.
        /// </summary>
        IDataStorage DataStorage { get; }

        /// <summary>
        /// Get current logger.
        /// </summary>
        ILogger Logger { get; }

        /// <summary>
        /// Gets the current scope manager.
        /// </summary>
        OperationScopeManager ScopeManager { get; }
    }
}